import request from '@/utils/request'

// 查询文章浏览记录列表
export function listViewRecord(query) {
  return request({
    url: '/blog/viewRecord/list',
    method: 'get',
    params: query
  })
}

// 查询文章浏览记录详细
export function getViewRecord(id) {
  return request({
    url: '/blog/viewRecord/' + id,
    method: 'get'
  })
}

// 新增文章浏览记录
export function addViewRecord(data) {
  return request({
    url: '/blog/viewRecord',
    method: 'post',
    data: data
  })
}

// 修改文章浏览记录
export function updateViewRecord(data) {
  return request({
    url: '/blog/viewRecord',
    method: 'put',
    data: data
  })
}

// 删除文章浏览记录
export function delViewRecord(id) {
  return request({
    url: '/blog/viewRecord/' + id,
    method: 'delete'
  })
}

// 获取所有用户列表/通过用户id获取用户列表
export function queryUserSelect(userIds) {
  return request({
    url: '/system/baseUser/queryUserList/' + userIds,
    method: 'get'
  })
}

// 获取文章下拉列表
export function queryBlogSelect(query) {
  return request({
    url: '/blog/blog/listAll',
    method: 'get',
    params: query
  })
}
